package org.jeecg.modules.tencent_esign.tencent_contract.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

@Data
@ApiModel(value = "电子签合同创建请求")
public class CreateFlowDTO {
    @ApiModelProperty(value = "合同ID")
    private String contractId;

    @ApiModelProperty(value = "合同名称")
    private String flowName;

    @ApiModelProperty(value = "合同描述")
    private String flowDescription;

    @ApiModelProperty(value = "模板ID")
    private String templateId;

    @ApiModelProperty(value = "操作人ID")
    private String operatorId;

    @ApiModelProperty(value = "操作人姓名")
    private String operatorName;
    @ApiModelProperty(value = "操作人手机号")
    private String operatorTel;

    @ApiModelProperty(value = "签署人列表")
    private List<Signer> signers;

    @ApiModelProperty(value = "合同控件内容")
    private List<FormField> formFields;

    @ApiModelProperty(value = "子客企业创建登录链接时自定义的名称（最好与营业执照名称一致）")
    private String proxyOrganizationName;

    @ApiModelProperty(value = "子客企业创建登录链接时给子企业起的一个代号，需要自己定义")
    private String proxyOrganizationOpenId;
    @ApiModelProperty(value = "企业签署方的RecipientId")
    private String recipientId;

    @Data
    @ApiModel(value = "签署人信息")
    public static class Signer {
        @ApiModelProperty(value = "签署人类型 PERSON-个人 ORGANIZATION-企业")
        private String approverType;

        @ApiModelProperty(value = "签署人姓名")
        private String name;

        @ApiModelProperty(value = "手机号")
        private String mobile;

        @ApiModelProperty(value = "证件类型 ID_CARD-身份证")
        private String idCardType;

        @ApiModelProperty(value = "证件号码")
        private String idCardNumber;

        @ApiModelProperty(value = "签署顺序")
        private Integer signOrder;

        @ApiModelProperty(value = "签署方的RecipientId")
        private String recipientId;
    }

    @Data
    @ApiModel(value = "合同控件内容")
    public static class FormField {
        @ApiModelProperty(value = "控件名称")
        private String componentName;

        @ApiModelProperty(value = "控件值")
        private String componentValue;
    }

}
